package edu.tsinghua.eea.powermanagementserver.model;

public class PMLog {
	public static final String[] tokenEnabled = {"ERROR"};
//	public static final String[] tokenEnabled = {"ERROR","WARNING","STEP","UNDEFD","DB_QUERY","INFO"};
	public static void debug(String format,Object... args){
		debug("UNDEFD", format, args);
	}
	
	public static void debug(String token, String format, Object... args){
		boolean b = false;
		for(String s:tokenEnabled){
			if(s.equalsIgnoreCase(token)){
				b = true;
				break;
			}
		}
		if(b)
			System.out.println(String.format("DEBUG # "+token+": "+format,args));
	}
}
